<template>
  <div class="flex">
    <CompA></CompA>
    <CompB></CompB>
    <div>
      <div v-for="item in category.list" :key="item.objectId">
        {{ item.name }}
      </div>
    </div>
    <div>
      <div v-for="item in category.parentList" :key="item.objectId">
        {{ item.name }}
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import CompA from "./comp-a.vue";
import CompB from "./comp-b.vue";
import { useCategory } from "../../store/category";
const category = useCategory();
category.initCategoryAction(); //触发action
</script>

<style scoped></style>
